package com.eimf.saf.base.querycomm;

/**
 * @author eden
 * @date 2013-11-18 下午1:44:47
 * @Description: 操作符枚举
 */
public enum OperatorEnum
{
    EQ("="), LT("<"), GT(">"), GE(">="), LE("<="), LIKE("like"), BLIKE("blike"), ALIKE("alike"), IN("in"), BETWEEN(
            "between"), NE("<>");
    private final String v;

    private OperatorEnum(final String v)
    {
        this.v = v;
    }

    public static OperatorEnum getEnum(final String name)
    {
        for (final OperatorEnum item : OperatorEnum.values())
        {
            if (name.equals(item.name()))
            {
                return item;
            }
        }

        return OperatorEnum.EQ;
    }

    @Override
    public String toString()
    {
        return v;
    }
}
